//获取应用实例
const app = getApp();

Page({
	data: {
    parentList: [{}]
  },
	onLoad: function() {
    this.getParentList();
  },


  getParentList(){
    var that = this;
    wx.request({
      url: app.globalData.api + '/index.php/wap/GoodsCat/getTopList',
      method: 'post',
      headers: {
        'platform': '' + app.globalData.platform,
        'version': '' + app.globalData.version,
      },
      data: {
        'field': ''
      },
      success: (res) => {
        that.setData({
          parentList: res.data.data.list
        })
        // console.log(that.data.parentList)
      },
    });
  },
});
